﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Entity;   //DbContext

namespace blogDemo.Models
{
    public class artic
    {
        public int ID { get; set; }
        public string title { get; set; }
        public string author { get; set; }
        public int views { get; set; }
        public string label { get; set; }
        public DateTime date { get; set; }
        public string content { get; set; }
    }

    public class user
    {
        public int ID { get; set; }
        public string username { get; set; }
        public string password { get; set; }
        public int level { get; set; }
    }

    public class blogDemoDbContext : DbContext
    {
        public blogDemoDbContext()
            : base("DbConnection")
        {

        }

        public DbSet<artic> artics { get; set; }
        public DbSet<user> users { get; set; }
    }
}